<jsp:include page="header.jsp" />
<jsp:include page="sidenav.jsp" />

<%@ page import="java.util.List" %>
<%@ page import="databean.ItemBean" %>

<div id ="content">
    <h1>Books in my selling list</h1>
	<hr />	
	
<% 
	List<ItemBean> items=(List<ItemBean>) request.getAttribute("items");
	boolean background = true;
	for(ItemBean item:items){
%>

		<div id ="ebayItem">
	
<%
		if (background) {
%>



		<div class = row0 style = "background:transparent; padding-top:5px; padding-bottom:5px;">

			<a href="<%=item.getViewItemURL()%>" target="_blank"><%=item.getTitle()%></a><br/>
			<label for="price">Price   :</label><%=item.getCurrentPrice()%>
			<label for="quantity">Quantity:</label><%=item.getQuantity()%>
			<label for="itemid">ItemID:</label><%=item.getItemID()%>

			<div id ="ebayButton">
				<input type="button" value="Edit" onClick="editItem(<%=item.getItemID() %>,<%=item.getTitle()%>,<%=item.getCurrentPrice()%>);"></input>
				<input type="button" value="Delete" onClick="deleteItem(<%=item.getItemID() %>);"></input>
			</div>


		</div>


<%
	background = false;
		} else {
%>


		<div class = row1 style = "background:#b9d7d9; padding-top:5px; padding-bottom:5px;" >

		<a href="<%=item.getViewItemURL()%>" target="_blank"><%=item.getTitle()%></a><br/>
		<label for="price">Price   :</label><%=item.getCurrentPrice()%>
		<label for="quantity">Quantity:</label><%=item.getQuantity()%>
		<label for="itemid">ItemID:</label><%=item.getItemID()%>
	
		<div id ="ebayButton">
			<input type="button" value="Edit" onClick="editItem(<%=item.getItemID() %>,<%=item.getTitle()%>,<%=item.getCurrentPrice()%>);"></input>
			<input type="button" value="Delete" onClick="deleteItem(<%=item.getItemID() %>);"></input>



		</div>

</div>
<%
	background = true;
		}
%>

		</div>
<%
}
%>


</div>
<jsp:include page="footer.jsp" />